package org.huifei.a9_facade;

/**
 * @author: huifei
 * @date: 2017-08-30 16:08
 */
public class Computer {

    private CPU cpu;
    private Memory memory;
    private Disk disk;

    public  Computer() {
        cpu = new CPU();
        memory = new Memory();
        disk = new Disk();
    }

    public void startup() {
        System.out.println("start the computer");
        cpu.startup();
        memory.startup();
        disk.startup();
        System.out.println("start computer finished");
    }

    public void shutdown() {
        System.out.println("begin to close the computer");
        cpu.shutdown();
        memory.shutdown();
        disk.shutdown();
        System.out.println("computer closed");
    }
}
